Add AMX handle support and use the new constructor.

Signed-off-by: mk124 <mk124a@gmail.com>