Refactor AES-256