Refactor the bouncer handler
Add support for serializing lists to json via self.write()