Add spinner and fix tests