moved "helper" functions to seperate import
added mutually exclusive grouping for pattern and cache files
forgot to move create_struct to lib
added creation time for values that are updated in real time to check for age