Fixed a few logic errors, improved loading GUI and options.