Minor.

Improved exception handling and removed unused references.