fixed erros in content.php; finished logic.php