updated comment
catch SQL error and display as model error
fixed attribute detection
added CSS ID for tabs