Refactored conversion button code.