Cleaned up ApplicationEx class.

Added first pass of JavaDoc.
Added singleton classes for objects used globally in the application.