Defined macro MAX
Made the headers compatible to microsoft compiler and gcc