Refactored, fix typo in docs