Static-ify some functions that didn't need to be exported, and improve a couple of comments. Gurjeet Singh