Refactor to improve code correctness of bloomfilter.Has