Restructure files into domain and gui components