Refactored code for clarity, moved orientationchange to standard bind method.
Refactored code for clarity, moved orientationchange to standard bind method.