Completed aes implementation