use 'respond_to'
use jst templates
remove '#' from url
factor out common functionality