Changed function name of factory arguments and fixed the deletion function