Make error messages way better. Fix some bugs.