General tidy up and addition of JavaDoc. Removed unused classes.