Moved some method to the separate file with generic utility functions