Remove deprecated way of using variables and fixup header