Integrated server and client side, modifications, refactoring