Fixed basename strip regex
Abstracted rendering specifics from Document class to Factory