Moved initialization into main function.
Merge branch 'master' into installer