Major overhaul of quantifier handling, initial commit.