Quantum phase transitions in NbFe2 and Ca3Ru2O7