Added comments and set functions that are only used by this file as static.
Completely rewrote, organized and commented log header file.