Tidyup

Proposed updates to modernise code. A few more updates to come.
I don't think it's weird.