Made below improvement according to Nir's review:
1. Declare the class members at the top of the class.
2. Correct spelling mistakes.
3. Add more documentations.
4. Add unit tests