Changes to mdhimtst.c to match the latest api, fixed indenting, and warnings