Fixed up the logger

Message should be a constant
Finished cleanup() code

Program now uses a universal cleanup() function. Will probably need to
be altered as program develops, but it does the job fine as of now