Heavy refactor for API. Wow, survived without any crazyness.