Issue #128: removal of dead code, removal of unneeded imports