Refined API and implemented example client