Cleaned up the messy log system a bit