Tidyup

Proposed updates to modernise code. A few more updates to come.
I agree about a whitespace and style PR, I'll probably do something like that, but I recommend against extending a legacy weird choice in style.