Limit animation frame updates to not consume to much CPU
Added jshintrc and fixed indentation etc