Refactor routing to allow regex matches

Includes another tabs/spaces cleanup commit (apparently I missed some)