refactor pretty printed errors and specs