fixed usage of global vars
fixed merge conflicts
Merge branch 'feature/global-vars' into develop