If the master failed to create, do not continue with the map.
Code and formatting improvements/fixes.

* Double to single quotes
* Variable names length should be >= 3
* No need to iterate through keys and values if all we want is values
* White space around math operators
* Max line length fixes