Added an optional frameCallback as a proposed solution to #8