Even more docs & refactoring