reapply b054aa8d and b8d152b7 sans all the indentation changes

Package-ify classes for modular design; fixes javadoc
Enables ant to selectively compile source files