New conversion code

Moved to footer.php