minor refactoring of indentation and adding explanatory comments
Added README.md (borrowed from pirelenito's related project in github