Refactoring Oculus Rift example