part of an earlier checkin. Also now saving and restoring options that aren't in the configuration file to/from the registry.
lib/arch. This should make porting easier. Will probably continue to refactor a little more, moving platform dependent event handling stuff into lib/platform.