First commit for refactorization
Adding tests
Refactorization is done. Prepering new version