Thanks, sorry for not responding to these earlier, I've been busy with the other work. I'll make a new pull request with the fixes marked.