Fixed cyclic dependency by moving the main function into the gui package