Tidied some spacing and removed unnecessary code