Change web dir to public.
Updated some packages.
Set up the variables before the 'if' statement so no exceptions are thrown on deploy.