Remove old export stuffs.
More lo-dash-ification

The main goal was to make as much of the frontend code more functional
as possible. While probably not complete (I can think of a couple places
where more effort than I was willing to put in at the moment), there are
a bunch of things that have been reworked to use lo-dash, instead of
some of the more monolithic loops we had.

There are also a couple indentation fixes that were needed after
switching from spaces to tabs.