Code cleanup 1.5

Removed commented code from .h files.
Code cleanup 2

Moved all function body to .h files