Fixed up example
Created example JS file