Refactoring the Query Composer so that I can pass in Scala functions as
well as Java functions into the composer.