Removed disabled code, convert NULL to nullptr