Fixing Test warnings and compiler errors