General fixing and cleaning of code.

Updated digging script and removed nasty eventstate stuff I wrote a
while ago. Also finished the rewrite of the event viewer so it is
actually efficient :o Also made a plank maker.