fixed some bugs in transforming; added env variable; made some progress with the integration tests