Migrating database calls to stored procedures to make it 'hoist' the queries out of the scripting language.