Overall code improvements.