Added minimal support for broken/incomplete implementations.

Riddled code with ugly macros.
Fix comparisons between signed and unsigned in test cases