Tidying away some of the unnecessary code