esil improovements and bugfixes