some refactoring, some cleaning, better README file