Updated to take more arguments including database and avro schema repository.