Added a file writing exercise as well as changed some of the
private/public interface of some functions