Change to ring buffer, flesh out API