Functional view of a Sphere with Keyboard and Mouse interaction. Some code refactoring.