working code ready for killdevil

This code is the running code for killdevil.