Local variables and few improvements.