Refactor and test the project edit command.