Minor refacoring by removing end php tags