older version support (1.0 and 1.1), and cleanup the code. reviewed by miked. This commit was SVN r29798.