Make things a bit more generic and add just enough SPECIALIZEs to avoid pentalties