Fixed the router to properly recurse into subdirectories.