Minor refactor of Crypt