Tricks to reduce memory usage.