Several changes in tests and unhooked loading, base class for hooked

@vldgeorgiev , what's the difference between this set of functions and the ones on the #ELSE section of this conditional compilation block?