tidied up some code and comments

fixed a broken tag