Consistency updates and use of global vars
Merge pull request #11 from zenduo/develop

Consistency updates and use of global vars