Added comments
Removed unused functions.