Add hactar.cc for test and fix some minor issues.