Minor code Refactoring
Running only one instance at a time