Refactoring: Abstraction layer for files.
Refactoring: Encapsulate encoding procedures.
Refactoring: Encapsulate decoding procedures.
Refactoring: Use only low-level file methods.