See TODOs for better xml parsing