Provide two clear versions, drop preprocessor directives, fix broken code.

- I moved an alternative version from a comment to an implementation, so it's easier to read with highlighting
- I didn't know that github turns off highlighting for code included within an #if preprocessor directive
- the first clear alternative was broken.