Error checking.

 + Tiny cleanup