Added some comments and final cleaning