remove comments and clean up code a bit