cleaned up comments and code a little