Removed some duplicate error strings, fixed some warnings.