Modularize validator

I extracted a single class that does all the validation stuff. Now it can be reused by other runners.