Cleanup and merge joshedit changes, no longer included in LGM repo.