Removing magic and adding onclick to edit buttons.
Accessors added.