Improve parsing, still not perfect