Wow, there are a lot of bugs here! pushed up revision 20, fixed another bug related to the categorization. Regards Stephen Smally