Added comments
Removed old functions