Remodelled file loading and added a util class for general functions