Do things properly while minimizing code duplication.