cleanup
Waits until bundles are complete before calling next(). Now updates bundle after templates are compiled