Suggestions and fixes from JB