Moved flip iside a class.