Still trying to eliminate duplicate code.