big refactor to improve design of integration tests and allow optionally removing config from code