Code fixes based on @jsondow review