breaking bug fixed
bunch of refactoring on the API for easier navigation