Conditional compilation

Not for merging yet, just for discussion.