$context added & sub function to transpose

$context added as global so we don't get undefined
transposeSettings function added as sub function we can all with params
copyOverSettings is now a function which calls that sub function 3
times.