Some changes to the backend api

For your review