Some refactoring and README file