Javascript edits

Main history functionality included