Some clean ups and modifications to the editing feature