Refactor, fix up pointer lock