some little refactoring for better readability
Enabled Sandbox with network entitlements, hopefully this won't bite me.
Settings window now actually becomes active when activated.