Added much nicer and formal log system. Also made most classes use the
new log system instead.