Improve matching on 'module'

Improves issue #10 but doesn't completely fix it