[JUnit] Added some Unit tests. Small bug fixes.