Add voluptuous vaildation and refine core.py tests