Code rewrite, basic docs, basic unit test
Added gitignore file