Commented and improved module registration functions
Finished commenting