cleanups from cryptostick branch