added interactive switch builder and some test cases to wpswitch, tweaked db-fix script.