Misc code cleanup and documentation
AMD support