Added clear button. Refactored for each register element code.