added string manipulation tools to util.h and made the file parsing in image abstraction more robust