Refactoring simple-router.rb