Used standard algorithms and move semantics where appropriate
Merge pull request #1 from dgodfrey95/patch-1

Used standard algorithms and move semantics where appropriate