first stage removal of obsolete code
big simplification
update lang module