testruns
code clean-up and small performance optimizations