Tidy code layout

Tidy code layout, apply Codex coding standard to make it a little more readable, for me at least :-)