module pattern. some minor cleanup. toggle functionality on / off with comments