Fix some set-but-not-used warnings.
Fix class member initialization order.