Switch to mobile client, new client code, major refactoring