Use $interval instead of window.interval

I also added a missing loading message, and swapped Math.round in favor of Math.floor, for a uniform number distribution.