Updated hdepth.lib, added tests for the functions