Cleanup test code, fix warnings