Rough ugly draft of the new API functionality