removing some useless code and deprecated stuff