Detecting circular reference, refactoring and adding getInstance
updating package versoin