Cleanup. Added exceptionHandling.