Cleanup functions.php

Just a bit of tidying.