Rewrite some code of this module, add delete functionality