Refactoring, starting to move to different methodology for interfacing backend and frontend