Further improvements

Thanks to @HowardCohl for the suggestions