Clean up functions.php

Remove long-unused code.