Improved class program (not finished yet).

This is an improved version of the class program.  Will need to add even
more documentation and also make corresponding changes to the script and
function programs.