Allow schema to be passed in