added ability to check for bad inputs in the route file and reformatted view to follow best practice