Restructure gui module