feat: general improvements and refactors. Add equality module. Add more tests