release: function passed to setInterval needs to be in a closure

Also changed setInterval timeout to 50 and cleaned up some js style.