Added some comments and cleaned some files