Code refactoring - creating the utilities file