Fix issues
Fix #3 Add tests