ignore ~ files
changed map to for loop
moved js to bottom of body