Added collation functions for all three modes.
Renamed the collation functions file.