some additional utility classes/functions and minimization tweaks