Removed reference to $timeout.
Fixed typo in variable name.