Updated with attributes and compiler directives up to XE5

Updated with attributes and compiler directives up to XE5