Refactor Tip Calculator to Remove Redundancies