Gave up on the memory optimisation...