Updated detector module and included test. Using minijson for caching and implemented basic caching mechanism, replacing previous filecache.