Changing the router to use JSON instead of php for routes.