Cleanup/refactor api.player