Fixed some output bugs and parsing.