Issue #5 corrected and AES functions simplified.