Declare variables at top of functions