I think I have solved the really hard parts. Now its just a matter of polishing the details. I'll try to upload the whole thing to Wikimedia's subversion repository sometimes in the next few days.
How do you handle template (interpretation)?
Thanks, Dirk