removed some useless and deprecated and commented code