Formatting & Removing unnecessary PHP end tags