fixing error where second tab did not show on "add" forms, was due to image being NULL and hence cake not closing the div
code formatting
move the model init into the section after checks are done
adjust code to match config
clear more cache and formatting