Making declarations inside functions local