move root route into its own module
tidy up server
tweaks
fix params checks