Cleanup and commenting

removed some bad code, and added more comments