Replacing usage of DB() and Sites() with Settings, which uses less memory.