angular setup, refactoring of client code to match server code structure