Cleanup and adding comments.