TMSS-259: Change format according to Jan Davids suggestions. Change list input to tuples and add caching.