Make the Margin class inherit from Canvas, rather than making a child object. Remove unused events.