Some refactoring and preparing initial release