Added some comments, code cleanup