Extract more methods to utility functions and simplify resolving