Reorganize directory structure and move UI widgets out of main source file.