Removing unused module
Improve exception handling.