Added a ton of comments & docs, refactored, and *hopefully* now support medium/medium transitions and nested media well enough to work. Haven't tested that part yet, though.