Fix modules to handle being in separate packages.
Fix a mistake
Fix a typo
Import one more forgotten function
Merge pull request #6 from 38a938c2/fix-packages

Fix modules to handle being in separate packages.