WIP: Moved most of the work to the backend, storing data in a session