parse() fixes and tests