Fixed an issue where our FFT algorithm could overflow the stack.
Refactor and fix various portions of the code.

This commit removes our viewport bounds structure, instead relying on
static #define's in config.h. This makes our viewport properties a bit
easier to get ahold of for callers, and makes the code a bit simpler to
understand.

Additionally, this commit makes small tweaks to our rendering code,
improving on or fixing various small issues.
Fixed an endianness bug in our decoding algorithms.
Fixed all remaining decoding bugs.
Removed some no-longer-useful debugging code.