Mods to common.R code

These mods allow common.R to be used outside of JASP.