Initial API refinement

Add relation and related tests