clean up crypto and exceptions