code style clean up and comments