Fixed inheritance stuff.
Added more constraints
Implemented base case (stable matching)