Various fixes related to editing/adding