This commit makes the app much more memory efficient.