Break package into subpackages.

Also get the router working while I'm at it...