More work on the api while trying to get an implementation down. Will do
proper docs once I feel the api has stablized