frobbing to make it work. Also moved the SIGSEGV handler (which isn't currently used) into this file.