Refactor

Use c++11 instead of boost
Pass by const ref instead of by value where appropriate
Delete dead code