Refactor animation code

Rendered frames are now handled by a FrameReceiver.