Optimize the memory usage a bit, clean up features