Modernise some of the code and remove extraneous usings
More modernisation