cleaned up some comments and code