Fixed a couple of bugs and stripped out temporary routing code