Add list route response as json

Also cleaned up tests to use var and more appropriate variables.