Rewriting most of the api to be more structured and actually working :)