add move semantics
minor code-style changes