refining js doc and using common scoped alias for defining functions