More parsed event stuff, fixed quit command, cleaned up threading management.