XML parsing and retrieve from db.
Cleaned stuff up.