Fix "Load from text file" feature, add other changes/fixes

See line notes for more info.