seperate classes in standalone files.  Added various improvements.