Changed type of amode_t
Completed more API