Refactored filename rendering.
Upon reflection, here are a few more variable name changes.