Added code conditioning script.
Merged some minor fixes, added main test file.