Added ifndef/define/endif macros. Fixed syntax errors.