Improvements/sanity checks.