First version 1:1 from Loevborg's original, but includes editor switch