Tidyup

Proposed updates to modernise code. A few more updates to come.
Each one to their own, I guess.