Added gui init code