Created more robust getMousePos, still have to update documentation.json.