Put functions from MAF_to_database into their own files