Implemented ref delete and create