First changes, reorganised the struture and got rid of some code and tidied some code up