some refactoring and CI script added