Various code consistency cleanup