First pass on cleanup for the amqp module.