bgzf code refactorisation/cleanup