Minor function edits/commented essential material