Fixed partial application on return and tailcall. Added tests.