Tidyup

Proposed updates to modernise code. A few more updates to come.
Fixed.