Refactored and streamlined filemap tokens into a key and a function that returns the token value