Make createVariable() methods consistent