Tidyup

Proposed updates to modernise code. A few more updates to come.
The subsequent lines are indented with tabs instead of spaces.