HOPKINS: More refactoring and renaming, remove several useless variables