added basic style, fixed registration, refactored some code