code cleanup and comments. Ready to go