refactor util classes;
fix asserts in tests