Make Function constructor return a real function

Issue #173