added namespace declarations and missing files