bug with delete's return value, fixed global err values to locals, got rid of module keyword