Refactoring discussion routes to allow for more dynamic JSON calls