More improvements and organization to leak detector