fix styles, add JS for dealing with reference list manipulations