Fix bug that causes crash on empty input
Change handling of lowercase author names

- Use case insensitive stable sorting instead of unstable case sensitive
- Creating keys does not change the case of the author names