Moved the environment setup
Moved kernel bindings to an earlier point
Merge pull request #67 from GrahamCampbell/env

Moved the environment setup