cleaned up some code/comments