- Implemented tests
- Removed dead code
- Some improvements