cleaned code, added functions.php