trivial improvements

I tried not to change your basic logic. Changed just explicit improvements.
I have one question for your logic, and a few features to be implemented more. And I'll make some issues for them.
Thank you for your great module. :)