Feature/cleanup api

_I'm not sure if commits should be rebased together_