Lots of little changes mainly to switching to AMD

Signed-off-by: Peter Thiessen <peter@midokura.com>