Cleanup and comments added