Make some refactoring for decoupling and make code moving easier
Make some refactoring for decoupling and make code moving easier