Updates to make edit mode work.