amd support, clean up
avoid infinite loops
update readme