test packages can now be parsed
Added debug function to enable/disable debugging messages.