Redone code structure and cube code