Various minor changes, re resetting shopt values