Debugged periodic orbit code