Need to refactor a lot and then start working on api side. Then come back and set up state/message handling