Adding GDT setup. Fixing compiler warnings.