implement classes DotWriter and DotRenderer;
update models.py to improve validation.