Pass by value ==> pass by const reference in obj loader, and fix warnings.