Made fromString more robust by removing leading and trailing quotes separately