add named captures to get path variables. refactor lots. improve nested params parse