Finished updating code to AMD