add support for @name in jsDocs
clean up code, add comments