Fixed bug where the estimated variance wasn't being computed properly; slightly cleaned up code for writing to various document elements; modified the exponential distribution to allow for a shift.