Added tests and reviewed constaint name and typehint