Added comments
Cleans up code