Add Spray routes, code refactor