Added user module

Also modified some code to conform with coding standards.