code cleanup
Better lowercase and valid filename generation
Fix tests for change in lowercase handling