Check date in resto-parser, fix some bugs (closes #91)