Fixed problem handling pass by value arguments.

Changing all the arguments to rvalue references failed to handle arguments which are passed by value.
Instead, we keep the arguments as their regular type and just use std::forward<> to move the values
to the constructors.

This is a rebase of pull #319.