added test directory and recordbinary.py
added data collector for testing
refactored templatecache
code cleanup
changed counter var in recordbinary.py and other minor changes
Merge branch 'master' into dev/TemplateCacheRefactor