fix issue with edit view (Model not loaded), applied some PEAR coding standards