Fix some tile math.
Fixes viewport clipping.
Factor out frame and frame container in two files.
Add missing file.
Port bit propagation system to frames.