cleaned up testcases and safecompile to work with them