restructured models and tidied up server code