abstract: Fix the code so it passes unit tests again

Signed-off-by: Jerome Flesch <jflesch@gmail.com>
Abstract_th: expose the new API

Signed-off-by: Jerome Flesch <jflesch@gmail.com>