Added some cfg. validation, etc.