Added error categories for routing exceptions and altered rng to increase security.