Refactor to handle routes by convention