Add some provision tests and fix a few things