Add notes, reorganize javascript.