code size changes, refactors