Moved everything out of Global Scope into app. Started re-writing Control Panel to be more flexibile.