API refactors and documentation