Adding explicit bind, optimizing imports.

Fixes #594