make test more like build
Refactor test methods, introduce compile