Minor refactor; error messages