Refactor Test runner and fix bu ild