cleaned up AES crypt for integration