Lint
Fix error logging, add spec