Cleanup redundent code