Refactoring, please hold the line...
fixed retreat dig and blink, removed useless code