little revamp. Singleton wrapper moved to client from cli.