Added validation and unit tests to the project.