Hey Grahame,
I've had a quick look at what you've done and I do like what I see!!
I'm giving it an A+ for effort !!

Having said that... You've duplicated something that already exists in Free Pascal.
The
fp-web package, in it's latest incarnation, already provides a router based implementation.
It's no shame to re-invent the wheel when you're trying to learn stuff!!!
I'm always quite adamant on that!!
But you did re-invent the wheel

Cheers,
Gus