API docs
clean up & bugfixes