Implementation of delete functionality

Still work in progress