Fix mixed declarations and code warning. Deprecation warnings fixed in !15 (merged).
mixed declarations and code