1. Address review comments.
2. Add unit tests.