Simplified and improved bare uri parsing.