Boolean Operations.

This is probably a crude integration. Need to resolve some issues,
such as finding the right place for constants, private classes etc.