various buglet squashing and optimisations