Cleaned up the code/comments