Clean code related to crypt