start refactoring of classes directory,file,imagefile and adding unit tests