Fixed almost all remaining bugs related to new editor