toolbox: Add reference counter to public interface
toolbox: Fix hash map