Completed Python Files for AIM Algorithm