implementation fixes

cleaned AES interface, corrected some header files, other misc