Checking code and other improvements.