Thanks for the quick response, that looks promising!
I am still getting the same "use of undefined type " error though.
Did I miss something in the definition?