Move variable decl
Fix tests