refactorings

- basically tried to move code from boost to c++11