Encryption/layout improvements