Add capabilities for filename() and unit tests