removed unnecessary comments and tidied up
almost done