I noticed that layer renaming is quite slow because it runs a lot of code on each keystroke. Should probably debounce that.