Added tests

Tests to validate labels. Also separated config from
main
Added warnings and errors