added jspath pattern matching, improved api & added samples