cleanup crypto code