Remove/Replace some useless code.