Fixes for undefined vars and more setup options