refactored primitive handling
added petstore example and improved location mappibng