minimal changes to get the code to start up outside an applet environment