Started output code, added projection-checking

Added projection frame checking to dimensionsmatch().
Started on output functions for imad; this might all be moved to
a helper function later on.
Broken broken broken, finished and fixing.

Finished the first pass of programming. Now fixing all the shit I
broke the first time around.