server code refactoring WIP
notes
notes
notes
server code refactoring
server code refactoring WIP