fixed styles, added comments, general cleanup