API Refactor

Reorganize some functions and rename functions that should not be used outside of the class to have an underscore infront.