Some refactoring of VariantAdapter.java