Moved feature test to script itself.

Also updated looping structure
Moved feature test to script itself.
Updated selectors to data-attributes.

Results in better separation of styles and scripts.