cleaned up and prettified subscription client code