Added some comments, removed log statements