Add player entity and refactor rendering code.