From JavaScript mess to Cleaner Code - Step 4