Changes based on sbyx's comments (thanks)