Refactor api big time

:construction: