Adds environment setup.

Fixes problem with tests.

Closes #58
Closes #64