Updated entity to handle rotations better.