Update docs and refactor function location.