Restructure the flow a bit