various code cleanups, fix issues in get_instance and make sure logger is created in application.__init__ (refs #7)