Small code refactoring to re-use code blocks + readme slight change