Added comments
Removed useless functions
Added comments