Added some comments, deleted debugging lines, deleted unnecessary imports