Simplify some more declarations and a little logic.