Reworked and finished backend API. Browser API not done.