Extract the editable label as a separate widget

This removes a ton of code duplication and makes things easier to read.