Better geometry calculations for shatter frames. Lots of cleanup to do!