Moved types to own file.
Added a lot of stuff + API. Doesn't compile or work yet.
Added more API.
Changed route.
Made log items private.