some refactoring and initial release preparation