Additional error-checking, normalize existing code to the more concise form.