Clean the code and add a looptest task.