refactor server file structure