Major code cleanup, and added a minor fix for the CLineEdit's to deselect all text when exiting their edit mode.