Issue #13: fix memory leak in tier service and fully support the valgrind-check