Working on variable replacement. Need to adjust the filereference code.