refactoring: uses c implementation of yaml and pickle, when applicable