Implemented move constructors.
Did some small refactoring.