Code improvements

This is a minor code improvement patch. It does not change or fix anything.