Making tests work in older iceweasel and firefox, and following coding standards.