move functions inside module
Merge pull request #46 from aviks/patch-1

move functions inside module