Added new mode for literate programming; made some initial modifications.

Will split into separate repository at some point.