Cleaned redundent code.