Fixed some bugs and added Unit Tests for Password validator