Remove bunch of useless code