fixed some jshint errors
replaced javascript timeout to angular timeout