Fix global headerBuf
Fix global i in 'for in's
Merge pull request #36 from bskyb-commerce-helpcentre/master

Make global variables local