minor fixes

a few php open tags fixed and some small formatting changes for readability