move path parsing to Endpoint class
rename "endpoint" to "path".