Eliminate unneccessary code