Sort functions correctly in documentation