Improved the way that the removal of shapes from the model is handled, closes #27.