Setup variables and array