Changed parser to use scanf.