Remove as many defines and ifdefs as possible