some refactoring and preparing for initial beta release