Main function encapsulated in App class. Added text control. Enabled switching between slider and sensor control.