Add docstring
Factor out filename composition for readability
Remove unused javascript