even more refactoring, moved some static methods to helper/utils classes to keep the rest clean