commented up and tidied