The Characterization of Thin Films and Layered Structures Using X-RAY Absorption and Reflection at Grazing Incidence