added delete function and extended the form to add custom macros - see scotch core form