Fixed CryptExample and moved some other functions