Managed to get everything to compile at least
Minor changes