changed base to use txt files all the time and added a flag to the gallery model