Switched Application to support child classes more easily. Removed globals.