remove ifdefs

Clarify the code by reducing ifdefs