Separate API registration from driver somewhat, and add more constants