Small changes based on comments by @armetiz