Move declaration at function beginning