couple of fixes in oztree.c
merged mb's changes
code cleanup and fixes
bug fixes ahoy