Removed and added comments on their appropiate places, renamed some func...

...tions etc