Fixing it up a little bit here. Untested
This is currently not gonna be in a running state so do not test. Look at this and the immediately preceding commit to figure out what I was working on and finish it.
Enhancement on assert
I believe this fixes a stupid syntax error
scripted update of code from master at 0ee05e1 I believe this fixes a stupid syntax error