Moved arrange-align code into editor