Restructure conditionals for encrypted/unencrypted