calendarProvider: save on the use of two buffers.
fileProvider: change file copying code a bit and add debug messages (they provided some insight as to when exactly the error happens).
Refactor code and get rid of two files imported from external projects, containing code which was a duplicate.
Saved about 400 bytes of executable.