Cleaned up client side api library