Fixed some bugs in argument passing, more clean-up of apply_ck
Merge pull request #176 from izaid/pack

Apply, pack, and arg passing fixes