Conditional compilation to exclude all Perl/XS stuff from C++ code
Minor optimizations
Merge remote-tracking branch 'upstream/master'