Functional functions I copy pasta around.