fix inconsistencies with ErlangEngine
code cleanup