Adding record function

This function is responsible for recording the relevant pieces of the
request. Also cleaning up the test suite a bit and adding a
setup/teardown piece to deal with the Redis connection and cleanup.

Signed-off-by: Aaron Bedra <aaron@aaronbedra.com>