Internal player merges

Updates the internal player code to match that in master.