Move soldier routine out of frame handler
Put soldier rutine in separate file

... and make it a routine to call