Fixed comment references
Improved comments and reoganized several classes.