Fixes #22 Fixes 21 Fixes 13. Use new debug compile option when testing.