defining MAX_INT etc
refactored code, moving AES keys etc into AesCnxHandler, shrinking the code a bit