misc player code cleanup