case e: Throwable to stop 'catches any exception' warnings
removed useless expression in Unit function