Reorganize crypto-related JS (#13).