Added comments

Deleted unnecessary code and added comments