Merged my changes in, a lot of them were made redundant so I haven't included those