Completely reworking the routes file to make it dynamic