some perf fixes and player input handling