diverse optimisations, fixed huge memory write due to setting of aligned tables when unnecessary