Move function declarations outside blocks