Raw code fixes
Added tests
fix logic
Update readme & setup