readjusted pacakge.json
refracted property checks to remove code smell and code down on code