Finally, a bit of refactoring, but obviously, docs :)