Modern C++11/14 optimization

Move semantics and re-factoring to comply with C++11