Remove underscore dependency. Remove duplicate package checking code.