some small refactoring and readme improvements