Vid 2013 - Adding bucky profiling to some JS

Also doing some code cleanup as I go.