Package statements into a function.