Improve route system: add patterns, sub-routes, improve core file class