Week 9 Peter Some minor change

Committed some minor change. All the function will be within the
independent js file. The index.html will only handle selection of the
visualization method.