Remove tests from main.cc. Add debug/release modes.