Avoid unnecessary object creation
Changed some parameter passing to pass by const-reference