Major revamp, added finding candidate keys