Made errors more visible.

Now we have compiler errors instead of Null Pointer Exceptions.