make all ui creation functions void and move callbacks to main.