Fix bug in update metadata checker.
Legacy support totally removed + some cleanup
Remove dom4j