Minor refactoring and a bit of re-styling