Pass prefix to router initialization

Passing the prefix to the router initialization is less prone to errors
because the begin level and prefix length can be derived from the
prefix.