Cleaning up Shape_Grammar class