cleanups
Small fixes
Server refactoring to modules.