refactoring: exception handling;getting rid of AES helper