Updating the grouping code with the latest version so that it doesn't crash when attempting to group objects. Animation still needs to be added to snap two objects together.