Modest rewrite, cleaned up the logic, un-minified,
and added a fleshed out app.’s example page.