minor refactoring + added support of optional parameters of unpack function (:no-nils :limit)