Adding tests, fixing combinators

Adding function for finding nested function. Included tests