Sorry Dave, I merged this since it fixed *some* problems. I will open an issue shortly to list the missing stuff that still needs to be done.