Improve sanity of code somewhat.