A bunch of changes aimed at code minimization