Renaming .trigger to shorter .emit, fixing .attr and testing.