Added settings validator. Fixes #3.