refactor to move use of Frappuccino from client code into lib