Changed structure for better transitions and other changes