little bit of fixing and refactoring to sort some spacing inconsistencies