Use absolute import for python3
Rewrite Crank to use functional programming