Eliminated more duplicate code.