Slowly working on this

This was previous work, will need to step through to determine what is
going on.