Added some comments.
Removed some logging.
Removed some comments and fixed whitespacing.