Addional refactoring to make class less complex and dry it up

Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.