Modified for Singleton instance

Changed the class to work as a Singleton instead of using a global
variable to store the instance of the class.  Also cleaned up the
spacing to make it prettier.