persistance layer outside main script