Adds frontend api, minor changes in the backend