Move defvars out of eval-when-compile. Move code