rewrite import paths

This patch fixes #68.

Some issues already reported ~~in #81~~ (fixed).

Comments and further testing are welcome here.