Use entity and claim objects instead of tupels

and add api wrapper class