Reworked backend to rest api. No longer working with frontend.