moved all extern definitions to ht.h