Started adding encoding functions.

Version 2 of filename encoding for bins.