Fixed appending comment bug and tidied up