Moved variable declarations to beginning of scope (C89).