Cleaned up some comments and code