Add documentation and minor code-refactoring

Again, in my opinion, API > api. Though as long as we are consistent I could live with either (that's a lie, I really really prefer API).