cleaning up

-formatting
-specifying some exceptions