Fixed a number of element ordering problems. Matches up with latest model-builder. Suppoert for tagging elements with orginal pom id.