Rectangles support in Module

Thank you for your cool project!

I modified a little bit from yours to support rectangles.
Please accept my pull request.
Thanks.
(Sorry for my poor English..)