1. Updated unit tests
2. Minor refactorings