Added validation to the edit page.

Also added 'Add' buttons that appear if there is no initial data in a
table.