Implementing CRUDFlinger in code