Checked unit tests with valgrind.

There is some uninitialised memory getting through, this means that the
clearLevel function is not initialising all the memory. I need to find out why
exactly. This commit includes a memset function call that fixes the problem,
however it should be removed.

It's still in there because it's being used for trying to find out the memory
that doesn't get initialised (the memory should be set to 999 somewhere).