Moved GUI loading to the state