I'm basically re-coding this. Old code is in the branch "old-code"