improved the logic around determining the meaning of a restful url. relates to #30