Fixed errors / Rewrote single.php