Refactor & docs.