Allow configuring GUI options from command line and enviroment

Fixes #505
Closes #507