C++11 port of my java class: data structures, try to use good unit testing, and best practices.