Added typing and first version of validator