Second commit - catch up to current state. Note that main does not execute correctly. I need to ammend the handling of the soft 17.