converted global js vars to local vars where possible
Quick tweak.
Merge branch 'master' into archive_query_refactor
Intermediate commit (added new DataCollection class for archive data).
Unfinished refactoring (tests won't pass): moved archive data managment & transformation to new class, removed timestamp metadata (which is not necessary due to period metadata), allowed anonymous function/callables to be used as datatable filters.