Restructured app to client and server for easier dev.