Goals edit and delete; refactoring