Once the main loop is switched to asyncio: * Integrate the UI state api endpoint into the main loop so it has easy access to ui states * Add the serialize method to the base ui class and make it more universal using introspection