Minor refactorings and updated readme