Modifying constructor to expect a filename to save as. Also some other
changes.