major refactoring

* fixed readme
* added new functional main
* added missing main.h
added testing