Some validation and tests added