Clean up filename generation