Fix identation, improve error messages