Application now supports multiple instances, this code is untested yet