Tweaks to generator and main