Made option parsing a bit better.