Fixing PHP notices, moving common js in the footer.tpl
Fixing SQL + improving UI when editing/adding a group see BT#4301