tidy up object return in spin.js and add example