code tidy and test against current data xml/an_trends